{template 'common/header'}

<div class="main">
	<ul class="nav nav-tabs">
		<li {if $state == 2 }class="active"{/if}><a href="{php echo $this->createWebUrl('employee');}">已审核员工</a></li>
		<li {if $state != 2 }class="active"{/if}><a href="{php echo $this->createWebUrl('employee',array('state'=>1));}">未审核员工</a></li>
	</ul>
	<div class="panel panel-info">
		<div class="panel-heading">员工数量： {$total} 人</div>
		    <div class="panel-body">
    </div>
		
		
	</div>

	<div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width: 50px;">序号</th>
						<th style="width: 100px;">员工姓名</th>
						<th style="width: 160px;">电话</th>
						<th style="width: 100px;">已接单数量</th>
						<th style="width: 130px;">接单状态</th>
                        <!--<th style="width: 270px;">地址</th>-->
						<th style="width: 200px; text-align: right;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $item}
					<tr>
						<td>{$item['id']}</td>
						<td>{$item['employeename']}</td>
						<td>{$item['tel']}</td>
						<td>{$item['sumorders']}</td>
						<td>
						{if $item['workstate'] ==0}空闲{elseif  $item['workstate'] ==1}<a class="btn btn-success btn-sm"
							href="{php echo $this->createWebUrl('showemployee', array('employeeid' => $item['id']))}"
							title="编辑"><i class="icon-edit"></i>取件途中</a> {else}<a class="btn btn-success btn-sm"
							href="{php echo $this->createWebUrl('showemployee', array('employeeid' => $item['id']))}"
							title="编辑"><i class="icon-edit"></i>工作中</a> {/if}
						
						</td>
						<!--<td>{$item['customercity']}{$item['customerarea']}{$item['xiangxdz']}</td>-->
						<td style="text-align: right;">
							<a class="btn btn-success btn-sm"
							href="{php echo $this->createWebUrl('showemployee', array('employeeid' => $item['id']))}"
							title="编辑"><i class="icon-edit"></i>信息编辑</a> 
							{if $item['employeestate'] !=2}
							<a class="btn btn-default btn-sm" href="#"
							onclick="drop_confirm('确定要通过审核吗?','{php echo $this->createWebUrl('showemployee',array('op'=>'update','employeeid'=>$item['id']))}');"
							title="审核"><i class="icon-edit"></i>审核</a>
							{/if}
							<a class="btn btn-default btn-sm" href="#"
							onclick="drop_confirm('确定要删除吗?','{php echo $this->createWebUrl('showemployee',array('op'=>'delete','employeeid'=>$item['id']))}');"
							title="删除"><i class="icon-remove"></i>删除</a>
							</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
		{$pager}
	</div>
</div>

<script type="text/javascript">
    function drop_confirm(msg, url){
        if(confirm(msg)){
            window.location = url;
        }
    }
</script>
{template 'common/footer'}
